/*
#include <iostream>
#include <string>

using namespace std;

string wk[7] = {"Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"};

int f(int y, int m, int d) {
	if(m <= 2) {
		m += 12;
		y--;
	}	

	return (d + 2*m + 3*(m+1)/5 + y + y/4 - y/100 + y/400) % 7;
}

int main()
{
	int y, m, d;

	cin >> y >> m >> d;
	
	cout << wk[f(y, m, d)] << endl;

	return 0;
}
*/